<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\Category;
use Illuminate\Http\Request;

class CategoryController extends Controller
{


    public function index(Request $request)
    {
        return successReturn(Category::query()->show()->orderBy('sort')->orderByDesc('id')->select(['id', 'name'])->get());
    }
}
